<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Route;

class AdminAuthMiddleware
{
    public function handle($request, Closure $next)
    {
        $userInfo = $request->session()->get('admin_info');
        if(empty($userInfo)){
            return redirect('/admin/login');
        }
        return $next($request);
    }
}
